A gravitational ellipse , second order ellipse out of a second order equation in JavaScript.

Time in seconds

 

dt

SurfacePerSecond0iRelatief

Wenergy0iRelative

rMax

 

xp is the velocity in x direction. xpp is the acceleration in x direction.

xxpxppxpppxpppp

yypyppypppypppp

rrprpprppprpppp

aapappapppapppp

 

radial components

R_term1

R_term2

R_term3

R_term4

R_term5

R_term6

 

angular components

A_term1

A_term2

A_term3

A_term4

A_term5

 

Checking the fault in the calculation

dr_dadr_da_par

dr_da_par_1dr_da_par_2

 

rStore1aStore1

rStore2aStore2

rStore3aStore3

rStore4aStore4

rStore5aStore5

 

xposypos

xdrawydraw